
#ifndef POSITION_H
#define POSITION_H

#include <QString>

#include "note.h"

#include "conversions.h"

class BasePosition
{
public:
    BasePosition() : intern_name(""), name (""), img ("") {}
    BasePosition(QString inm, QString nm = "", QString u = "") : intern_name(inm), name (nm), img (u) {}

    QString getName(void) { return name; }
    QString getInternName(void) { return intern_name; }
    QString getImg(void) { return img; }

private:
    QString intern_name;
    QString name;
    QString img;
};

class Position
{
public:
    Position() : base_pos(), note (Note()), freq (440.0), warning_msg ("") { }
    Position(BasePosition bps, Note nt = Note(), qreal fr = CONCERT_PITCH_FREQUENCY, QString msg = "");
    Position(QString inm, QString nm, QString u = "", Note nt = Note(), qreal fr = CONCERT_PITCH_FREQUENCY, QString msg = "");

    QString getName(void) { return base_pos.getName(); }
    QString getImg(void) { return base_pos.getImg(); }
    QString getMsg() { return warning_msg; }

    Note getApparentNote(void) { return apparentNote; }
    Note getNote(void) { return note; }
    qreal getFreq(void) { return freq; }

    bool hasMsg() { if(warning_msg.isEmpty() == true || warning_msg == "") return false; else return true; }

private:

    BasePosition base_pos;

    Note apparentNote;
    Note note;

    qreal freq;

    QString warning_msg;
};

#endif // POSITION_H
